
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Renderer · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="symbol.html" />
    
    
    <link rel="prev" href="graphiclayer.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介页
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    ArcGIS API for JavaScript4.x
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="xue-xi-he-kai-fa-ji-qiao.html">
            
                <a href="xue-xi-he-kai-fa-ji-qiao.html">
            
                    
                    学习技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="kai-fa-ji-qiao.html">
            
                <a href="kai-fa-ji-qiao.html">
            
                    
                    开发技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="mapimagelayer.html">
            
                <a href="mapimagelayer.html">
            
                    
                    MapImageLayer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="featurelayer.html">
            
                <a href="featurelayer.html">
            
                    
                    FeatureLayer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="graphiclayer.html">
            
                <a href="graphiclayer.html">
            
                    
                    GraphicLayer
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.6" data-path="renderer.html">
            
                <a href="renderer.html">
            
                    
                    Renderer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="symbol.html">
            
                <a href="symbol.html">
            
                    
                    2DSymbol
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="di-tu-shi-jian.html">
            
                <a href="di-tu-shi-jian.html">
            
                    
                    地图事件之地图状态监听
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="di-tu-shi-jian-zhi-dian-ji.html">
            
                <a href="di-tu-shi-jian-zhi-dian-ji.html">
            
                    
                    地图事件之点击
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="mo-ni-dian-yun-dong-tu-ceng.html">
            
                <a href="mo-ni-dian-yun-dong-tu-ceng.html">
            
                    
                    模拟点运动图层
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="untitled.html">
            
                <a href="untitled.html">
            
                    
                    集成echarts实现迁徙图特效
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="shi-xian-dian-ju-he-xiao-guo.html">
            
                <a href="shi-xian-dian-ju-he-xiao-guo.html">
            
                    
                    实现点聚合效果
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../arcgis-api-for-javascript3.x.html">
            
                <a href="../arcgis-api-for-javascript3.x.html">
            
                    
                    ArcGIS API for JavaScript3.x
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../vue.html">
            
                <a href="../vue.html">
            
                    
                    VUE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../docker/">
            
                <a href="../docker/">
            
                    
                    Docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../docker/docker-shi-yong-nginx-dai-li-zhuan-fa-ssr.html">
            
                <a href="../docker/docker-shi-yong-nginx-dai-li-zhuan-fa-ssr.html">
            
                    
                    Docker使用Nginx代理转发SSR
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../docker/docker-da-jian-ge-ren-wordpress-wang-zhan.html">
            
                <a href="../docker/docker-da-jian-ge-ren-wordpress-wang-zhan.html">
            
                    
                    Docker搭建个人wordpress网站
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../docker/docker-an-zhuang.html">
            
                <a href="../docker/docker-an-zhuang.html">
            
                    
                    Docker安装
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../nginx.html">
            
                <a href="../nginx.html">
            
                    
                    Nginx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../untitled.html">
            
                <a href="../untitled.html">
            
                    
                    小技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../ci-cd.html">
            
                <a href="../ci-cd.html">
            
                    
                    CI/CD
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Renderer</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="renderer">Renderer</h1>
<table>
<thead>
<tr>
<th style="text-align:left">&#x9700;&#x6C42;</th>
<th style="text-align:left">&#x5B9E;&#x73B0;&#x9700;&#x6C42;&#x7684;&#x6E32;&#x67D3;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">&#x53EA;&#x6839;&#x636E;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F;&#x6E32;&#x67D3;</td>
<td style="text-align:left">SimpleRenderer,  HeatmapRenderer</td>
</tr>
<tr>
<td style="text-align:left">&#x6839;&#x636E;&#x5C5E;&#x6027;&#x552F;&#x4E00;&#x503C;&#x6E32;&#x67D3;</td>
<td style="text-align:left">UniqueValueRenderer</td>
</tr>
<tr>
<td style="text-align:left">&#x5206;&#x6BB5;&#x503C;&#x6E32;&#x67D3;</td>
<td style="text-align:left">ClassBreakRenderer</td>
</tr>
<tr>
<td style="text-align:left">&#x8FDE;&#x7EED;&#x503C;&#xFF0C;&#x591A;&#x5B57;&#x6BB5;&#x6E32;&#x67D3;</td>
<td style="text-align:left">SimpleRenderer&#xFF0C;UniqueValueRenderer&#xFF0C;visualVariables</td>
</tr>
</tbody>
</table>
<h2 id="simplerenderer">SimpleRenderer</h2>
<pre><code class="lang-text">renderer = {
  type: &quot;simple&quot;,  // autocasts as new SimpleRenderer()
  symbol: { type: &quot;simple-fill&quot; },  // autocasts as new SimpleFillSymbol()
  visualVariables: [{
    type: &quot;color&quot;,
    field: &quot;POPULATION&quot;,
    normalizationField: &quot;SQ_KM&quot;,
    // features with 30 ppl/sq km or below are assigned the first color
    stops: [{ value: 100, color: &quot;#FFFCD4&quot; },
          { value: 500, color: &quot;#0D2644&quot; }]
  }]
};
</code></pre>
<h2 id="heatmaprenderer">HeatmapRenderer</h2>
<pre><code class="lang-text">renderer = {
  type: &quot;heatmap&quot;,
  field: &quot;crime_count&quot;,
  colorStops: [
    { ratio: 0, color: &quot;rgba(255, 255, 255, 0)&quot; },
    { ratio: 0.2, color: &quot;rgba(255, 255, 255, 1)&quot; },
    { ratio: 0.5, color: &quot;rgba(255, 140, 0, 1)&quot; },
    { ratio: 0.8, color: &quot;rgba(255, 140, 0, 1)&quot; },
    { ratio: 1, color: &quot;rgba(255, 0, 0, 1)&quot; }
  ],
  minPixelIntensity: 0,
  maxPixelIntensity: 5000
};
</code></pre>
<h2 id="uniquevaluerenderer">UniqueValueRenderer</h2>
<pre><code class="lang-text"> renderer = {
  type: &quot;unique-value&quot;,  // autocasts as new UniqueValueRenderer()
  field: &quot;REGION&quot;,
  field2: &quot;RANK&quot;,
  field3: &quot;CLASS&quot;,
  fieldDelimiter: &quot;, &quot;,  // comma + space used to separate values from all fields
  uniqueValueInfos: [
    {
      value: &quot;North, 1, medium&quot;,  // features in the &quot;North&quot; region, a rank of 1, and &quot;medium&quot; class
      symbol: sym1  // will be assigned sym1
    }, {
      value: &quot;North, 2, medium&quot;,  // features in the &quot;North&quot; region, a rank of 2, and a &quot;medium class
      symbol: sym2  // will be assigned sym2
    },
    ...
  ],
  visualVariables: [{
    type: &quot;opacity&quot;,
    field: &quot;POPULATION&quot;,
    normalizationField: &quot;SQ_KM&quot;,
    // features with 30 ppl/sq km or below are assigned the first opacity value
    stops: [{ value: 100, opacity: 0.15 },
            { value: 1000, opacity: 0.90 }]
  }]
};

renderer.addUniqueValueInfo({

});
</code></pre>
<h2 id="classbreakrenderer">ClassBreakRenderer</h2>
<pre><code class="lang-text">renderer = {
  type: &quot;class-breaks&quot;,  // autocasts as new ClassBreaksRenderer()
  field: &quot;HARVESTED_ACRES&quot;,
  classBreakInfos: [
    {
      minValue: 0,  // 0 acres
      maxValue: 200000,  // 200,000 acres
      symbol: sym1,  // will be assigned sym1
      label: &quot;fewer than 200,000 acres&quot;
    }, {
      minValue: 200001,  // 200,001 acres
      maxValue: 500000,  // 500,000 acres
      symbol: sym2,  // will be assigned sym2
      label: &quot;200,000 - 500,000 acres&quot;
    }, {
      minValue: 500001,  // 500,001 acres
      maxValue: 750000,  // 750,000 acres
      symbol: sym3,  // will be assigned sym2
      label: &quot;more than 500,000 acres&quot;
    }
  ]
};

renderer.addClassBreakInfo({

});
</code></pre>
<h2 id=""> </h2>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="graphiclayer.html" class="navigation navigation-prev " aria-label="Previous page: GraphicLayer">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="symbol.html" class="navigation navigation-next " aria-label="Next page: 2DSymbol">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Renderer","level":"1.2.6","depth":2,"next":{"title":"2DSymbol","level":"1.2.7","depth":2,"path":"arcgis-api-for-javascript4.x/symbol.md","ref":"arcgis-api-for-javascript4.x/symbol.md","articles":[]},"previous":{"title":"GraphicLayer","level":"1.2.5","depth":2,"path":"arcgis-api-for-javascript4.x/graphiclayer.md","ref":"arcgis-api-for-javascript4.x/graphiclayer.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"arcgis-api-for-javascript4.x/renderer.md","mtime":"2019-09-27T03:24:31.189Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-30T03:42:42.849Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

